package com.zgm.ch04.beanPostProcessor._8_1;

import java.util.Date;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

public class SimpleBean {

	@Timestamp
	Date createDate;  //注意：不能为private
	
	@PostConstruct
	public void initialize(){
		System.out.println("初始化：Initializing bean " + getClass());
	}
	
	@PreDestroy
	public void cleanUp(){
		System.out.println("销毁：Cleaning up bean " + getClass());
	}
	
	public String toString(){
		return "Bean 被创建于: " + this.createDate;
	}
}
